package com.iscas.tech.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.geekidea.springbootplus.framework.validator.groups.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 前端用户注册表
 *
 * @author yangyi
 * @since 2020-10-26
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "AtBaseuser对象")
public class AtBaseuser extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "id不能为空", groups = {Update.class})
    @ApiModelProperty("主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户名")
    private String userName;

    @NotBlank(message = "手机号码不能为空")
    @ApiModelProperty("手机号码")
    private String userTel;

    @NotBlank(message = "登录密码（md5）不能为空")
    @ApiModelProperty("登录密码（md5）")
    private String userPwd;

    @ApiModelProperty("真实姓名")
    private String userRealname;

    @ApiModelProperty("身份证号")
    private String cardId;

    @ApiModelProperty("用户类型（1:个人 2:学校 3:企业 4:科研机构 5:其他）")
    private Integer userType;

    @NotNull(message = "审核状态（0:未审核(默认)  1:已审核）不能为空")
    @ApiModelProperty("审核状态（0:未审核(默认)  1:已审核）")
    private Integer auditStatus;

    @ApiModelProperty("最后登录时间")
    private Date lastLogintime;

    @ApiModelProperty("删除状态（1存在，0刪除）")
    private Integer delstatus;

    @ApiModelProperty("创建人")
    private Integer createtitle;

    @ApiModelProperty("提交交易创建时间")
    private Date createtime;

}
